use std::fs::File;
use std::io::Error;

use flate2::read::GzDecoder;
use tar::Archive;

fn main() -> Result<(), Error> {
    let path = "resource/tar/archive.tar.gz";

    let tar_gz = File::open(path)?;
    let tar = GzDecoder::new(tar_gz);
    let mut archive = Archive::new(tar);
    archive.unpack("resource/tar/")?;

    Ok(())
}
